package com.googlecode.agscrum.model.service;

import java.util.List;

import com.googlecode.agscrum.model.exceptions.GScrumDomainException;
import com.googlecode.agscrum.model.util.Criteria;

public interface Service<Entity, Key> {

	Entity save(Entity e) throws GScrumDomainException;

	void remove(Entity e) throws GScrumDomainException;

	Entity findById(Key k);

	List<Entity> findAll();

	List<Entity> readByCriteria(Criteria criteria, int initialPos, int finalPos);

	Long totalOfByCriteria(Criteria criteria);

	List<Entity> readByCriteria(Criteria criteria);

}
